<?php
/**
 * Created by PhpStorm.
 * User: xiandanjia
 * Date: 2018/10/30
 * Time: 下午 3:40
 */

namespace App\Components;

/**
 * 操作句柄
 * Class Handle
 * @package App\Components
 */
class Handle
{

    /**
     * redis操作句柄
     * @return \Swoft\Redis\Redis
     */
    public static function redis(){
        return (new Cache())->redisHandle();
    }

    /**
     * 获取memcache操作句柄
     * @return $this
     * @throws \Exception
     */
    public static function memcache(){
        return (new Memcached())->getInstance();
    }
}